package day0515;

public class Car {
    public void start(){
        System.out.println("启动汽车");
    }

    String color;
    String brand;
    double price;
    int passengerNum;

    Car(){//构造方法的特点：1.方法名必须与类名相同 2.没有返回值类型
        this("", "" , 0, 4);
    }
    Car(int n,String s){

    }
    Car(String s,int n){

    }
    Car(String c, String b, double p, int n){
        color=c;//将参数c的值赋给color
        brand=b;
        price=p;
        passengerNum=n;
    }

    public static void main(String[] args) {
        Car c=new Car();
        System.out.println(c.color.equals("红色"));
    }




    public void stop(){
        System.out.println("停车");
    }
    public void beDrive(){
        System.out.println("驾驶汽车");
    }
    public String getMessage(){
        return "颜色："+color+"品牌："+brand+"价格："+price+"乘客数："+passengerNum;
    }
}
